package online_store.model.dto;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import online_store.model.bus.CategoryBus;
import online_store.model.dto.CategoryDTO;

public class DefaultDataForm {
	
	@Autowired
	private CategoryBus categoryBus;
	
	@Transactional(value="jpaTransactionManager")
	public List<CategoryDTO> getCategories(){
		return categoryBus.findAll();
	}
}
